/*
 * @Author: your name
 * @Date: 2021-08-06 20:28:34
 * @LastEditTime: 2021-08-06 21:15:33
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \hrsaas-86\src\components\directives\index.js
 */
export const imgerror = {
  inserted(el, binding) {
    console.log(binding.value)
    el.onerror = function() {
      el.src =
        binding.value ||
        'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201604%2F06%2F20160406214047_ZKTfS.thumb.700_0.jpeg&refer=http%3A%2F%2Fb-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1630845181&t=1b1000b49554c87c6afe1b2599b4ff50'
    }
  }
}
export const red = {
  inserted(el) {
    el.style.color = 'red'
  }
}
export const yellow = {
  inserted(el) {
    el.style.color = 'yellow'
  }
}
